package com.jason.data;


import java.util.concurrent.CountDownLatch;

public class RunnableDemo implements Runnable {

    CountDownLatch latch;

    int i;
    public RunnableDemo(CountDownLatch latch,int i) {
        this.latch = latch;
        this.i = i;
    }

    @Override
    public void run() {
        //http访问get请求
        long starTime = 0;
        try {
           // starTime = System.currentTimeMillis();
            System.out.println("开始，第"+i+"个");
            latch.await();
           // System.out.println("请求开始了");
            //JSONObject jsonObject = httpPost("http://192.168.100.43:8080/lua/requestIdfa", "userId=3&bundleName=xxxxxx&country=US&thirdParty=sdfsfs");
           // System.out.println("返回的状态码为："+jsonObject.get("code"));
           // System.out.println("返回的状态信息："+jsonObject.get("desc"));
           // System.out.println("返回的内容为："+jsonObject.get("content"));
            HttpClient.doGet("http://localhost:8888/limit/");

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
